import java.util.Random;
import java.util.Scanner;

public class Test{
    public static void main(String[] args) {
        //生成随机数
        //Random random = new Random(123);//123：保证随机数不会改变
        Random random = new Random();
        //int n = random.nextInt(100);//[0-100)
        Scanner scan = new Scanner(System.in);
        int input = scan.nextInt();
        int n = random.nextInt(100)+1;//[1-101)
        while(true){
            System.out.println("请输入数字(1-100)");
            if(input<n){
                System.out.println("猜小了");
            } else if (input > n) {
                System.out.println("猜大了");
            }else{
                System.out.println("猜对了");
                break;
            }
            System.out.println("是否继续猜数字（yes）-（1）");
            int option = scan.nextInt();
            if(option != 1){
                break;
            }
        }

    }
    public static void main3(String[] args) {
        //循环读取
        Scanner scanner = new Scanner(System.in);
        while(scanner.hasNextLine()){
            System.out.println("请输入姓名");
            String name = scanner.nextLine();
            System.out.println("姓名："+name);
        }
    }
    public static void main2(String[] args) {
        //用continue打印被3和5整除的数
        for(int i = 0;i < 100;i++){
            if(i % 15 != 0){
                continue;
            }
            else{
                System.out.println(i);
            }
        }
    }
    public static void main1(String[] args) {
        //阶乘相加
        //①
        int n = 1, sum = 0, ret=1;
        while(n < 5){
            int i = 1;
            while(i < 5){
                ret *= i;
                i++;
            }
        }
        System.out.println(ret);
        System.out.println(sum);
        // ②
//        int i = 1;
//        int ret = 1, sum = 0;
//        for(int j = 1;j <= 5;j++){
//        while(i <= j){
//            ret *= i;
//            i++;
//            }
//        sum += ret;
//        }
//        System.out.println(ret);
//        System.out.println(sum);
    }
    public static void main0(String[] args) {
        //练习调试
        //计算1~100的奇数和，偶数和，和
        int i=1;
        int Odd = 0,Even = 0, Sum = 0;
        while(i <= 100){
            if(i % 2 == 0) {
                Even += i;
            }else{
                Odd += i;
            }
            Sum += i;
            i++;
        }
    }
}
